import './assets/main.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

import App from './App.vue'
import router from './router'

import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'
import '@kangc/v-md-editor/lib/theme/style/github.css'

// highlightjs
import hljs from 'highlight.js'
// 按需引入语言包
import json from 'highlight.js/lib/languages/json'

import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'

hljs.registerLanguage('json', json)

VueMarkdownEditor.use(githubTheme, {
  Hljs: hljs,
})

const app = createApp(App)
app.use(pinia)
app.use(router)

app.mount('#app')
